package com.koalton.steward.flow.service;

import com.koalton.steward.flow.dao.FlowDao;
import com.koalton.steward.flow.dao.FlowDaoImpl;
import com.koalton.steward.flow.model.Flow;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by koalton on 2017/7/11.
 */
@Service
public class FlowService {
    @Autowired
    FlowDao flowDao ;
    @Autowired
    FlowDaoImpl flowDaoImpl ;

    /**
     * 添加流水记录
     * @param flow 流水记录
     */
    public void add(Flow flow){
        flowDao.insert(flow);
    }

    public Flow get(Long flowId){
        return flowDaoImpl.query(flowId);
    }

    public int test(){
        return flowDaoImpl.test();
    }
}
